********** Do File for Final PRQ Paper **********

***** Table 2 *****
clear
use "C:\Users\David Macdonald\Dropbox\Final PRQ Student Loan Debt and Participation\Combined 2016 and 2020 CES Data.dta"

svyset [pweight=commonweight]

svy: tab Female if Student_Loan_Debt==0
svy: tab Age_40plus if Student_Loan_Debt==0
svy: tab Race_4cat if Student_Loan_Debt==0
svy: tab Education_4cat if Student_Loan_Debt==0

svy: tab Female if Student_Loan_Debt==1
svy: tab Age_40plus if Student_Loan_Debt==1
svy: tab Race_4cat if Student_Loan_Debt==1
svy: tab Education_4cat if Student_Loan_Debt==1

***** Table 3 *****
clear
use "C:\Users\David Macdonald\Dropbox\Final PRQ Student Loan Debt and Participation\Combined 2016 and 2020 CES Data.dta"

* Turnout *
reg Valid_Vote Student_Loan_Debt Age Age2_100 College Female White Third_Generation Over_80K_Income Employ_Student Married Child Own_Home Residence_Five_Plus_Years Military_CF Union_CF Weekly_Church Swing_State ///
i.Year, r
outreg2 using tab.tex, dec(3) replace

reg Valid_Vote Student_Loan_Debt Age Age2_100 College Female White Third_Generation Over_80K_Income Employ_Student Married Child Own_Home Residence_Five_Plus_Years Military_CF Union_CF Weekly_Church Swing_State ///
Interest_Most_of_Time Contacted i.Year, r
outreg2 using tab.tex, dec(3) append 

* Display Sign *
reg Political_Sign Student_Loan_Debt Age Age2_100 College Female White Third_Generation Over_80K_Income Employ_Student Married Child Own_Home Residence_Five_Plus_Years Military_CF Union_CF Weekly_Church Swing_State ///
i.Year, r
outreg2 using tab.tex, dec(3) append

reg Political_Sign Student_Loan_Debt Age Age2_100 College Female White Third_Generation Over_80K_Income Employ_Student Married Child Own_Home Residence_Five_Plus_Years Military_CF Union_CF Weekly_Church Swing_State ///
Interest_Most_of_Time Contacted i.Year, r
outreg2 using tab.tex, dec(3) append 

* Campaign Work *
reg Campaign_Work Student_Loan_Debt Age Age2_100 College Female White Third_Generation Over_80K_Income Employ_Student Married Child Own_Home Residence_Five_Plus_Years Military_CF Union_CF Weekly_Church Swing_State ///
i.Year, r
outreg2 using tab.tex, dec(3) append

reg Campaign_Work Student_Loan_Debt Age Age2_100 College Female White Third_Generation Over_80K_Income Employ_Student Married Child Own_Home Residence_Five_Plus_Years Military_CF Union_CF Weekly_Church Swing_State ///
Interest_Most_of_Time Contacted i.Year, r
outreg2 using tab.tex, dec(3) append 

* Donate Money *
reg Donate_Money Student_Loan_Debt Age Age2_100 College Female White Third_Generation Over_80K_Income Employ_Student Married Child Own_Home Residence_Five_Plus_Years Military_CF Union_CF Weekly_Church Swing_State ///
i.Year, r
outreg2 using tab.tex, dec(3) append

reg Donate_Money Student_Loan_Debt Age Age2_100 College Female White Third_Generation Over_80K_Income Employ_Student Married Child Own_Home Residence_Five_Plus_Years Military_CF Union_CF Weekly_Church Swing_State ///
Interest_Most_of_Time Contacted i.Year, r
outreg2 using tab.tex, dec(3) append

***** Table 4 *****
clear
use "C:\Users\David Macdonald\Dropbox\Final PRQ Student Loan Debt and Participation\Combined 2016 and 2020 CES Data.dta"

* Non Swing States *
reg Valid_Vote Student_Loan_Debt Age Age2_100 College Female White Third_Generation Over_80K_Income Employ_Student Married Child Own_Home Residence_Five_Plus_Years Military_CF Union_CF Weekly_Church ///
i.Year if Swing_State==0, r
outreg2 using tab.tex, dec(3) replace

reg Valid_Vote Student_Loan_Debt Age Age2_100 College Female White Third_Generation Over_80K_Income Employ_Student Married Child Own_Home Residence_Five_Plus_Years Military_CF Union_CF Weekly_Church ///
Interest_Most_of_Time Contacted i.Year if Swing_State==0, r
outreg2 using tab.tex, dec(3) append

*Swing States *
reg Valid_Vote Student_Loan_Debt Age Age2_100 College Female White Third_Generation Over_80K_Income Employ_Student Married Child Own_Home Residence_Five_Plus_Years Military_CF Union_CF Weekly_Church ///
i.Year if Swing_State==1, r
outreg2 using tab.tex, dec(3) append 

reg Valid_Vote Student_Loan_Debt Age Age2_100 College Female White Third_Generation Over_80K_Income Employ_Student Married Child Own_Home Residence_Five_Plus_Years Military_CF Union_CF Weekly_Church ///
Interest_Most_of_Time Contacted i.Year if Swing_State==1, r
outreg2 using tab.tex, dec(3) append

***** Table 5 *****
clear
use "C:\Users\David Macdonald\Dropbox\Final PRQ Student Loan Debt and Participation\Combined 2016 and 2020 CES Data.dta"

* Some College or Less*
reg Valid_Vote Student_Loan_Debt Age Age2_100 SomeCol_vs_Less Female White Third_Generation Over_80K_Income Employ_Student Married Child Own_Home Residence_Five_Plus_Years Military_CF Union_CF Weekly_Church Swing_State ///
i.Year if Employ_Student==0 & (educ>=1 & educ<=3), r
outreg2 using tab.tex, dec(3) replace

reg Valid_Vote Student_Loan_Debt Age Age2_100 SomeCol_vs_Less Female White Third_Generation Over_80K_Income Employ_Student Married Child Own_Home Residence_Five_Plus_Years Military_CF Union_CF Weekly_Church Swing_State ///
Interest_Most_of_Time Contacted i.Year if Employ_Student==0 & (educ>=1 & educ<=3), r
outreg2 using tab.tex, dec(3) append 

* Two-year degree *
reg Valid_Vote Student_Loan_Debt Age Age2_100 Female White Third_Generation Over_80K_Income Employ_Student Married Child Own_Home Residence_Five_Plus_Years Military_CF Union_CF Weekly_Church Swing_State ///
i.Year if Employ_Student==0 & educ==4, r
outreg2 using tab.tex, dec(3) append

reg Valid_Vote Student_Loan_Debt Age Age2_100 Female White Third_Generation Over_80K_Income Employ_Student Married Child Own_Home Residence_Five_Plus_Years Military_CF Union_CF Weekly_Church Swing_State ///
Interest_Most_of_Time Contacted i.Year if Employ_Student==0 & educ==4, r
outreg2 using tab.tex, dec(3) append

* Four-year degree *
reg Valid_Vote Student_Loan_Debt Age Age2_100 Female White Third_Generation Over_80K_Income Employ_Student Married Child Own_Home Residence_Five_Plus_Years Military_CF Union_CF Weekly_Church Swing_State ///
i.Year if Employ_Student==0 & educ==5, r
outreg2 using tab.tex, dec(3) append

reg Valid_Vote Student_Loan_Debt Age Age2_100 Female White Third_Generation Over_80K_Income Employ_Student Married Child Own_Home Residence_Five_Plus_Years Military_CF Union_CF Weekly_Church Swing_State ///
Interest_Most_of_Time Contacted i.Year if Employ_Student==0 & educ==5, r
outreg2 using tab.tex, dec(3) append

* Graduate degree *
reg Valid_Vote Student_Loan_Debt Age Age2_100 Female White Third_Generation Over_80K_Income Employ_Student Married Child Own_Home Residence_Five_Plus_Years Military_CF Union_CF Weekly_Church Swing_State ///
i.Year if Employ_Student==0 & educ==6, r
outreg2 using tab.tex, dec(3) append

reg Valid_Vote Student_Loan_Debt Age Age2_100 Female White Third_Generation Over_80K_Income Employ_Student Married Child Own_Home Residence_Five_Plus_Years Military_CF Union_CF Weekly_Church Swing_State ///
Interest_Most_of_Time Contacted i.Year if Employ_Student==0 & educ==6, r
outreg2 using tab.tex, dec(3) append

***** Table 6 *****
clear
use "C:\Users\David Macdonald\Dropbox\Final PRQ Student Loan Debt and Participation\Clean ANES 2019 Pilot.dta"

svyset [pweight=weight]

svy: mean Favor_Cancel_Loans if Student_Loans==0
svy: mean Favor_Cancel_Loans if Student_Loans==1

svy: mean Favor_Free_College if Student_Loans==0
svy: mean Favor_Free_College if Student_Loans==1
